import Model from '@/utils/http.js'
const api = new Model()
// 获取 积分运营配置
export function getOperationConfiguration (){
	return api.get({
		url: '/equity/card/donation/getOperationConfiguration'
	})
}

// 精选活动
export function getActivityList(data){
	return api.get({
		url: '/choiceness/activity/v1/list',
		data:data
	})
}

// H5 平台积分商品列表
export function getCommodityList(data){
	return api.get({
		url: '/integral/commodity/v1/list',
		data:data
	})
}

// H5 平台积分商品详情
export function getCommodityInfo(id){
	return api.get({
		url: `/integral/commodity/v1/getInfo/${id}`,
	})
}
// H5 兑换商品 地址
export function getDefaultAddress(id){
	return api.put({
		url: '/mine/center/getDefaultAddress',
	})
}

// H5 用户兑换订单列表
export function getOrderList(data){
	return api.get({
		url: '/customer/change/order/list',
		data:data
	})
}

// H5 平台积分商品详情
export function getOrderInfo(id){
	return api.get({
		url: `/customer/change/order/getInfo/${id}`,
	})
}

// H5设置交易密码
export function setTradePassword(data){
	return api.put({
		url: '/mine/center/setTradePassword',
		data:data
	})
}
// H5修改交易密码
export function updateTradePassword(data){
	return api.put({
		url: '/mine/center/updateTradePassword',
		data:data
	})
}

// 忘记密码 获取登录手机验证码
export function getSmsCode(phone){
	return api.get({
		url: '/mine/center/sms/code',
		data: {
			"phone": phone
		}
	})
}
// 短信验证码验证
export function postSmsVerification(data){
	return api.post({
		url: '/mine/center/sms/verification',
		data:data
	})
}

// H5通过短信验证 设置交易密码
export function setSmsTradePassword(data){
	return api.put({
		url: '/mine/center/setSmsTradePassword',
		data:data
	})
}

// H5 用户地址列表
export function getAddressList(data){
	return api.get({
		url: '/mine/center/address/list',
		data:data
	})
}

// H5 新增 用户地址
export function addAddress(data){
	return api.post({
		url: '/mine/center/address',
		data:data
	})
}

// H5 编辑 用户地址
export function editAddress(data){
	return api.put({
		url: '/mine/center/address',
		data:data
	})
}

// H5 用户地址详情
export function getInfoAddress(id){
	return api.get({
		url: `/mine/center/address/getInfo/${id}`,
		
	})
}
// H5 设置默认 用户地址
export function setDefault(id){
	return api.put({
		url: `/mine/center/setDefault/${id}`,
		
	})
}
// 省市区接口
export function getCommonCity(){
	return api.get({
		url:'/common/v1/city',
	})
}

// H5 兑换商品
export function putCommodityExchange(data){
	return api.put({
		// url:'/integral/commodity/v1/exchange',
		url:'/change/order/exchange',
		type:1,
		data:data
	})
}
//查询支付结果
export function payResult(orderId){
	return api.get({
		url:`/integral/commodity/v1/pay/result/${orderId}`,
	})
}

// 获取竞猜活动信息（H5）
export function getActivityInfo(id){
	return api.get({
		url:`/guess/activity/${id}`,
	})
}
// 获取用户的当前余额（H5）
export function getCustomerAmount(){
	return api.get({
		url:'/guess/activity/customer/amount',
	})
}

// 查询支持记录列表
export function getBetRecordList(data){
	return api.get({
		url:'/guess/activity/support/bet/record/list',
		data:data
	})
}

export function getEventsRank(id){
	return api.get({
		url:`/guess/activity/support/events/rank/${id}`,
	})
}

// 查询支持竞猜活动比赛时间列表
export function getEventsTimeList(data){
	return api.get({
		url:'/guess/activity/support/events/time/list',
		data:data
	})
}

// 查询支持竞猜活动比赛时间列表
export function getEventsList(data){
	return api.get({
		url:'/guess/activity/support/events/list',
		data:data
	})
}

// 查询冠军竞猜投注对象列表
export function getChampionTeamList(id){
	return api.get({
		url:`/guess/activity/champion/team/list/${id}`,
	})
}

// 查询支持记录列表
export function getChampionRecordList(data){
	return api.get({
		url:'/guess/activity/champion/bet/record/list',
		data:data
	})
}

//竞猜交易支付
export function getActivitySupportPay(data){
	return api.post({
		// url:'/guess/activity/support/pay',
		url:'/guess/order/support/pay',
		type:1,
		data:data
	})
}
// 冠军竞猜交易支付
export function getActivityChampionPay(data){
	return api.post({
		// url:'/guess/activity/champion/pay',
		url:'/guess/order/champion/pay',
		type:1,
		data:data
	})
}

// 查询合成列表下拉框
export function castingSelect(data){
	return api.get({
		url:'/shenye/casting/activity/select',
        data
	})
}
// 查询合成列表
export function getH5CastingActivityList(data){
	return api.get({
		url:'/shenye/casting/activity/getH5CastingActivityList',
        data
	})
}
//查询合成记录列表
export function getRecordList(data){
	return api.get({
		url:'/shenye/casting/activity/getRecordList',
        data
	})
}
// 查询销毁记录列表
export function getDestroyRecordList(data){
	return api.get({
		url:'/shenye/destroy/activity/getRecordList',
        data
	})
}

//查询合成活动详情
export function castingDetail(id){
	return api.get({
		url:`/shenye/casting/activity/detail/${id}`,
	})
}
//查询合成活动详情V2
export function castingDetailV2(id){
	return api.get({
		url:`/shenye/casting/activity/detailV2/${id}`,
	})
}



//铸造数字权益卡
export function payCasting(data){
	return api.post({
		url:`/shenye/casting/activity/casting`,
        data
	})
}

//查询熔炉列表下拉框
export function destroySelect(params){
	return api.get({
		url:'/shenye/destroy/activity/select',
        data:params
	})
}
//查询熔炼列表V2
export function getH5DestroyActivityList(params){
	return api.get({
		url:'/shenye/destroy/activity/getH5DestroyActivityList',
        data:params
	})
}
//查询熔炼活动详情
export function destroyDetail(id){
	return api.get({
		url:`/shenye/destroy/activity/detail/${id}`,
	})
}
// 销毁数字权益卡
export function payDestroy(data){
	return api.post({
		url:`/shenye/destroy/activity/destroy`,
        data
	})
}
//查询NFR详情
export function getCardId(id){
	return api.get({
		url:`/shenye/casting/activity/equity/card/${id}`,
	})
}

// 查询奖池中奖排行榜
export function paradiseRankList(data){
	return api.get({
		url:'/shenye/paradise/jackpot/rank/list',
		data:data
	})
}

//查询用户奖池中奖详情
export function paradiseInfo(id){
	return api.get({
		url:`/shenye/paradise/customer/jackpot/detail/${id}`,
	})
}
//2023-5-19
// 查询权益库存详情
export function inventoryCode(data){
	return api.get({
		url:'/common/v1/equity/inventory/code',
		data:data
	})
}

// H5神椰搜索列表 全部
export function searchListAll(data){
	return api.post({
		url:'/shenye/search/list/v3',
		data:data
	})
}
// H5神椰搜索列表分页V2
export function searchList(data){
	return api.get({
		url:'/shenye/search/page/list/v3',
		data:data
	})
}
// 查询当前用户持有权益卡最小卡号
export function haveCustomerCard(id){
	return api.get({
		url: `/equityManager/equityCard/have/customer/card/${id}`,
	})
}
// 查询用户商家权益卡详情
export function merchantCardDetail(id){
	return api.get({
		url: `/equityManager/equityCard/customer/merchant/card/detail/${id}`,
	})
}
//查询资产包详情
export function assetPackageDetail(data){
	return api.get({
		url: `/equityManager/equityCard/asset/package/detail`,
        data: data,
	})
}
//获取玩转神椰    
export function getIntegralPlayRule(){
	return api.get({
		url: `/common/v1/getIntegralPlayRule`,
	})
}  
//获取神椰限时打卡活动订单id    
export function getLimitTimeActivityOrderId(){
	return api.get({
		url: `/equity/card/config/v1/getLimitTimeActivityOrderId`,
	})
}       

//公告信息未读数量   
export function getAnnouncementNum(){
	return api.get({
		url: `/mine/center/announcement/num`,
	})
} 
 
//获取展示轮播图或者背景图 1 轮播图 2 背景图   
export function getShowType(){
	return api.get({
		url: `/shenye/advertisement/config/v2/getShowType`,
	})
}
//获取神椰背景
export function getShenyeBackground(){
	return api.get({
		url: `/shenye/advertisement/config/v2/getShenyeBackground`,
	})
}
//获取区域
export function getTradeArea(){
	return api.get({
		url: `/shenye/trade/punch/activity/config/v1/getTradeArea`,
	})
}
//打卡活动配置列表
export function cardActivityLs(data){
	return api.get({
		url: `/shenye/trade/punch/activity/config/v1/h5/list`,
		data
	})
}
//H5 推荐列表分类列表 不分页
export function recommendTypels(){
	return api.get({
		url: `/equity/card/recommend/type/v1/list`,
	})
} 

//H5打卡活动详情
export function tradeunchDetail(data){
	return api.get({
		url: `/shenye/trade/punch/activity/h5detail`,
		  data: data,
	})
}
//H5打卡弹窗详情
export function getH5PopDetail(data){
	return api.get({
		url: `/shenye/trade/punch/activity/getH5PopDetail`,
		  data: data,
	})
}
//H5打卡进度
export function getH5PunchProgress(id){
	return api.get({
		url: `/shenye/trade/punch/activity/getH5PunchProgress/${id}`,
	})
}

//查询打卡活动核销结果
export function punchVerifycation(data){
	return api.post({
		url: `/shenye/trade/punch/activity/order/verifycation/result`,
		data
	})
}

//高德地图转百度地图
export function gdToBd(data){
	return api.get({
		url: `/common/v1/gdToBd`,
		data
	})
}
//H5打卡活动详情(订单进入)
export function getH5ActivityDetail(data){
	return api.get({
		url: `/customer/order/summary/getH5ActivityDetail`,
		  data: data,
	})
}
//弹窗活动详情
export function getPopActivityInfo(id){
	return api.get({
		url: `/pop/activity/v1/getPopActivityInfo/detail/${id}`,
	})
}
//弹窗活动 赚卡产品列表
export function getPopActivityCardConfigList(data){
	return api.get({
		url: `/pop/activity/v1/getPopActivityCardConfigList`,
		  data: data,
	})
}
//弹窗活动 立即领取
export function activityReceive(data){
	return api.post({
		url: `/pop/activity/v1/receive`,
		  data: data,
	})
}
//查询权益卡购买成功弹窗（赠送CoCo时）
export function successProp(data){
	return api.get({
		url: `/equity/order/pay/success/popup`,
		  data: data,
	})
}
//获取进行中弹窗活动
export function getInProgress(){
	return api.get({
		url: `/pop/activity/v1/getInProgress`,
	})
}
//设置当天隐藏弹窗活动
export function hidePopActivity(id){
	return api.get({
		url: `/pop/activity/v1/hidePopActivity/${id}`,
	})
}
// 获取微信群二维码
export function getWxQrcode(id){
	return api.get({
		url: `/wechat/group/qrcode/${id}`,
	})
} 
//获取展示二维码地址
export function getShowWechatGroupQrcodeUrl(){
	return api.get({
		url: `/wechat/group/qrcode/getShowWechatGroupQrcodeUrl`,
	})
} 
// <------------神椰 2.4.2 Star----------------->
// 分类赚卡查询
export function getMerchantEquityCardListByTag(data){
	return api.get({
		url: '/equity/card/config/v1/getMerchantEquityCardListByTag',
		data
	})
}
//  <----------------end--------------------->
// <------------神椰 2.4.5 Star----------------->
// 搜索发现 标签列表
export function getMerchantEquityCardTagList(){
	return api.get({
		url: '/shenye/search/getMerchantEquityCardTagList',
	})
}
//  <----------------end--------------------->

